BasedOn=“{StaticResource {x:Type TextBox}}” in Code Behind for Style?

Try this: editingStyle. BasedOn = (Style) FindResource(typeof (TextBox)) And I don't know any way how you can make it apply the Theme style without specifying BasedOn If there is such a way, I would like to know it two.

Try this: editingStyle. BasedOn = (Style) FindResource(typeof (TextBox)) And I don't know any way how you can make it apply the Theme style without specifying BasedOn. If there is such a way, I would like to know it two...

Beautiful! Thanks Pavlo, works! – Meleak Mar 4 at 15:08.

This should work: Style baseStyle = new Style(typeof(TextBox)); Style editingStyle = new Style(typeof(TextBox)); editingStyle. BasedOn = baseStyle; You can also do it in the constructor: Style editingStyle = new Style(typeof(TextBox), baseStyle).

Thanks for your answer! Yes, I hoped that would work to but the Theme Style isn't picked up for some reason. If I do it in Xaml it works.. – Meleak Mar 4 at 14:58.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions